



//
//  MBFirstSearchView.m
//  房源详情-小区详情
//
//  Created by MB__Lee on 2018/5/25.
//  Copyright © 2018年 MB__Lee. All rights reserved.
//

#import "MBFirstSearchView.h"

#import "MBCityVC.h"
#import "MBTextFieldVC.h"


@interface MBFirstSearchView()<UITextFieldDelegate>

//搜索专用
@property (weak, nonatomic) IBOutlet UITextField *searchField;

@end

static NSString *MBFirstSearchView_Identi = @"MBFirstSearchView";

@implementation MBFirstSearchView
-(void)awakeFromNib{
    [super awakeFromNib];
    self.searchField.delegate = self;
    
}

+(instancetype)MBFirstSearchViewInitail{
    
    MBFirstSearchView *searView =  [[NSBundle mainBundle] loadNibNamed:MBFirstSearchView_Identi owner:nil options:nil].lastObject;
    
    return  searView;
}

- (IBAction)cityBtnAction:(id)sender {
    
    if (_cityBlock) {
        //生成城市选择器
        UIViewController *cityVC = [[MBCityVC alloc] init];
        _cityBlock(cityVC);
    }

    
}

#pragma mark --UITextFieldDelegate
-(void)textFieldDidBeginEditing:(UITextField *)textField{
    
    if (_textBlock) {
        UIViewController *textVC = [[MBTextFieldVC alloc] init];
        _textBlock(textVC);
    }
    
}




@end
